import Loadable from 'react-loadable';
import Loading from '@/components/Loading'
const Dashboard = Loadable({loader: () => import(/*webpackChunkName:'Dashboard'*/'@/views/dashboard'),loading: Loading});
const Guide = Loadable({loader: () => import(/*webpackChunkName:'Guide'*/'@/views/guide'),loading: Loading});
const OrderList =Loadable({loader:()=>import(/*webpackChunkName:'OrderList'*/'@/views/order/list'),loading: Loading})
const OrderAdd =Loadable({loader:()=>import(/*webpackChunkName:'OrderAdd'*/'@/views/order/add'),loading: Loading})
const User =Loadable({loader:()=>import(/*webpackChunkName:'User'*/'@/views/user'),loading: Loading})
const Product =Loadable({loader:()=>import(/*webpackChunkName:'Product'*/'@/views/product'),loading: Loading})

export default [
  { path: "/dashboard", component: Dashboard, roles: ["admin","editor","guest"] },
  { path: "/order/list", component: OrderList, roles: ["admin","editor"] },
  { path: "/order/add", component: OrderAdd, roles: ["admin","editor"] },
  { path: "/guide", component: Guide, roles: ["admin","editor"] },
  { path: "/product", component: Product, roles: ["admin"] },
  { path: "/user", component: User, roles: ["admin"] },
];
